@echo off
for /f "delims=" %%a in (a.txt) do (
   setlocal enabledelayedexpansion
   for %%i in (%%a) do (
      set "str=0000000000%%i"
      set .!str:~-10!=%%i
    )
    for /f "tokens=2 delims==" %%i in ('set .') do set var=!var! %%i
    echo !var!
    endlocal
)
pause